package algorithms.log;

public class Log {
    private static ThreadLocal<Long> time = new ThreadLocal();
    public static void start() {
        System.out.println("开始执行...");
        time.set(System.currentTimeMillis());
    }

    public static void end() {
        time.set(System.currentTimeMillis());
        System.out.println("执行完毕，耗时=====>"
                +(System.currentTimeMillis() - time.get())
                + "ms"
        );
    }

}
